package com.example.onlineeducation.data.constant

/**
 * 性别
 */
object ProStateErrorType {

    @JvmStatic
    fun getProStateName(workState: Int?, isBlack: Int?, isStop: Int?) = when {
        workState == 0 -> {//进场状态：0-退场，1-进场
            "退场"
        }
        isBlack == 1 -> {//是否黑名单：0-否，1-是
            "黑名单"
        }
        isStop == 1 -> {//是否停机：0-否，1-是
            "停机"
        }
        else -> {
            "正常"
        }
    }

    @JvmStatic
    fun proStatusIsOK(workState: Int?, isBlack: Int?, isStop: Int?) = when {
        workState == 0 -> {//进场状态：0-退场，1-进场
            false
        }
        isBlack == 1 -> {//是否黑名单：0-否，1-是
            false
        }
        isStop == 1 -> {//是否停机：0-否，1-是
            false
        }
        else -> {
            true
        }
    }

    /**
     * 判断是否是班组长
     * @param isPersonGroupMaster Int?
     * @return Boolean
     */
    @JvmStatic
    fun isProMonitor(isPersonGroupMaster: Int?) = when (isPersonGroupMaster) {
        0 -> false
        1 -> true
        else -> true
    }
}